package top.songxs.gmall.feign.retryer;

import feign.RetryableException;
import feign.Retryer;

public class MyRetryer implements Retryer {

    private int startCount = 1;
    private int endCount = 3;
    @Override
    public void continueOrPropagate(RetryableException e) {
        if (startCount>endCount){
            throw e;
        }
        startCount++;
        System.out.println("MyRetryer---->continueOrPropagate-------->执行了");

    }

    @Override
    public Retryer clone() {
        return new MyRetryer();
    }
}
